home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / src / lpvmglob.c < prev    next >
C/C++ Source or Header  |  1997-07-22  |  6KB  |  178 lines

  1.  
  2. static char rcsid[] =
  3.     "$Id: lpvmglob.c,v 1.9 1997/06/27 19:53:56 pvmsrc Exp $";
  4.  
  5. /*
  6.  *         PVM version 3.4:  Parallel Virtual Machine System
  7.  *               University of Tennessee, Knoxville TN.
  8.  *           Oak Ridge National Laboratory, Oak Ridge TN.
  9.  *                   Emory University, Atlanta GA.
  10.  *      Authors:  J. J. Dongarra, G. E. Fagg, M. Fischer
  11.  *          G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci,
  12.  *         P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
  13.  *                   (C) 1997 All Rights Reserved
  14.  *
  15.  *                              NOTICE
  16.  *
  17.  * Permission to use, copy, modify, and distribute this software and
  18.  * its documentation for any purpose and without fee is hereby granted
  19.  * provided that the above copyright notice appear in all copies and
  20.  * that both the copyright notice and this permission notice appear in
  21.  * supporting documentation.
  22.  *
  23.  * Neither the Institutions (Emory University, Oak Ridge National
  24.  * Laboratory, and University of Tennessee) nor the Authors make any
  25.  * representations about the suitability of this software for any
  26.  * purpose.  This software is provided ``as is'' without express or
  27.  * implied warranty.
  28.  *
  29.  * PVM version 3 was funded in part by the U.S. Department of Energy,
  30.  * the National Science Foundation and the State of Tennessee.
  31.  */
  32.  
  33. /*
  34.  *    lpvmglob.c
  35.  *
  36.  *    Libpvm Globals.
  37.  *
  38. $Log: lpvmglob.c,v $
  39.  * Revision 1.9  1997/06/27  19:53:56  pvmsrc
  40.  * Fixed polltype/polltime bug in AIX4MP.
  41.  *
  42.  * Revision 1.8  1997/06/27  17:32:25  pvmsrc
  43.  * Updated for WIN32 header files & Authors.
  44.  *
  45.  * Revision 1.7  1997/05/29  15:13:06  pvmsrc
  46.  * Moved decl (init) of pvmrouteopt inside MPP/SHMEM vs. "normal" defines.
  47.  *     - for MPP/SHMEM -> PvmDontRoute, "normal" -> PvmAllowDirect.
  48.  *
  49.  * Revision 1.6  1997/05/21  16:01:52  pvmsrc
  50.  * Updated ifdefs to include AIX4MP arch type.
  51.  *
  52.  * Revision 1.5  1997/03/06  21:08:28  pvmsrc
  53.  *         Added includes:
  54.  *         <netinet/in.h>, <netinet/tcp.h> "host.h" "pvmmimd.h"
  55.  *
  56.  * Revision 1.4  1997/02/13  23:35:54  pvmsrc
  57.  * Added new PvmNoReset setopt/getopt option.
  58.  *     - added new pvmnoreset, pvmnoresetindex globals in lpvm.[ch].
  59.  *     - to set use pvm_putinfo() -> PVMNORESETCLASS first avail w/lock,
  60.  *         save index in pvmnoresetindex.
  61.  *     - to unset use pvm_delinfo().
  62.  *
  63.  * Revision 1.3  1997/01/28  19:26:28  pvmsrc
  64.  * New Copyright Notice & Authors.
  65.  *
  66.  * Revision 1.2  1996/12/18  22:28:55  pvmsrc
  67.  * Added new FILE *logfp decl.
  68.  *     - only #ifdef LOG.  (previously only in shmem stuff)
  69.  *     - needed for now shared pvmlogerror() routine.
  70.  *
  71.  * Revision 1.1  1996/10/24  19:43:39  pvmsrc
  72.  * Initial revision
  73.  *
  74.  *
  75.  */
  76.  
  77.  
  78. #include <stdio.h>
  79. #ifdef WIN32
  80. #include "..\xdr\types.h"
  81. #include "..\xdr\xdr.h"
  82. #else
  83. #include <rpc/types.h>
  84. #include <rpc/xdr.h>
  85. #include <netinet/in.h>
  86. #include <netinet/tcp.h>
  87. #endif
  88. #include <pvm3.h>
  89. #include "pmsg.h"
  90. #include <pvmtev.h>
  91. #include "tevmac.h"
  92. #include "host.h"
  93. #include "waitc.h"
  94. #include "global.h"
  95.  
  96.  
  97.  
  98. /***************
  99.  **  Globals  **
  100.  **           **
  101.  ***************/
  102.  
  103. int pvmautoerr = 1;                        /* whether auto print err msg */
  104.  
  105. struct Pvmtracer pvmctrc =                /* child tracer info */
  106.     { 0, 0, 0, 0, 0, 0, 0, 0, "" };
  107.  
  108. struct Pvmtracer pvmtrc =                /* task tracer info */
  109.     { 0, 0, 0, 0, 0, 0, 0, 0, "" };
  110.  
  111. int pvmmyptid = -1;                        /* parent task id */
  112. int pvmmytid = -1;                        /* this task id */
  113. int pvmmyupid = -1;                        /* process unix pid */
  114. int pvm_useruid = -1;                    /* user's unix uid */
  115. int pvmmydsig = 0;                        /* native data enc, init XDR */
  116. int pvmschedtid = 0;                    /* scheduler task */
  117. int pvmrescode = 0;                        /* allow reserved tids, tags */
  118. int pvmshowtaskid = 1;                    /* catchout shows task ids */
  119. int pvmtoplvl = 1;                        /* funct called outside lib */
  120. int pvmdebmask = 0;                        /* which debugging info */
  121. int pvmnoreset = 0;                        /* task reset override */
  122. int pvmnoresetindex = -1;                /* task reset overrd mb index */
  123.  
  124. #if defined(IMA_CM5) || defined(IMA_CUBE) || defined(IMA_I860) \
  125.   || defined(IMA_PGON) || defined(IMA_SP2MPI) || defined(IMA_ALPHAMP) \
  126.   || defined(IMA_CSPP) || defined(IMA_HPPAMP) || defined(IMA_RS6KMP) \
  127.   || defined(IMA_SGIMP) || defined(IMA_SGIMP64) || defined(IMA_SUNMP) \
  128.   || defined(IMA_AIX4MP) || defined(AIX4SP2)
  129. #include "pvmmimd.h"
  130. int pvmrouteopt = PvmDontRoute;            /* task-task routing style */
  131. int pvmfrgsiz = MAXFRAGSIZE;            /* msg frag length (to pack) */
  132. int pvmudpmtu = MAXFRAGSIZE;            /* local UDP MTU */
  133. #else
  134. int pvmrouteopt = PvmAllowDirect;        /* task-task routing style */
  135. int pvmfrgsiz = UDPMAXLEN;                /* msg frag length (to pack) */
  136. int pvmudpmtu = UDPMAXLEN;                /* local UDP MTU */
  137. #endif
  138.  
  139. int pvmmyctx = 0;                        /* current message context */
  140. int pvmnsibs = -1;                        /* number in our spawn group */
  141. int *pvmsibtids = 0;                    /* tids in our spawn group */
  142.  
  143. struct pmsg *pvmrxlist = 0;                /* not-recvd msg list */
  144.  
  145. struct pmsg *pvmrbuf = 0;                /* current recv/unpack msg */
  146. struct pmsg *pvmsbuf = 0;                /* current send/pack msg */
  147.  
  148.  
  149. #if defined(IMA_ALPHAMP) || defined(IMA_CSPP) || defined(IMA_HPPAMP) \
  150.     || defined(IMA_RS6KMP) || defined(IMA_SGIMP) \
  151.     || defined(IMA_AIX4MP) || defined(IMA_SGIMP64) || defined(IMA_SUNMP)
  152. int pvmpolltype = PvmPollSleep;            /* memory polling style */
  153. int pvmpolltime = BUSYWAIT;                /* time value for poll wait */
  154. #endif
  155.  
  156.  
  157. #ifdef LOG
  158. FILE *logfp = 0;                        /* my own log file */
  159. #endif
  160.  
  161.  
  162. /* General Trace Globals */
  163.  
  164. struct pvmtrcencvec *pvmtrccodef;        /* trace packing vector */
  165.  
  166. struct timeval pvmtrcztv = { 0, 0 };    /* trace zero time value */
  167.  
  168. struct pmsg *pvmtrcmp;                    /* trace record buffer mesg */
  169.  
  170. int pvmtrcsbfsave = 0;                    /* trace save send buffer */
  171. int pvmtrcsbf = 0;                        /* trace record buffer */
  172.  
  173. int pvmtrcdesc;                            /* trace descriptor status */
  174. int pvmtrctmp;                            /* trace temporary storage */
  175.  
  176. int pvmtrcsavekind;                        /* trace event kind for fin */
  177.  
  178.